import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:graduation_project/found/found_tabs.dart';

import 'leader_mod/leader_hot.dart';
import 'leader_mod/leader_rank.dart';

class leader_mid extends StatefulWidget {
  const leader_mid({Key key}) : super(key: key);

  @override
  State<leader_mid> createState() => _leader_midState();
}

class _leader_midState extends State<leader_mid> {
  @override
  Widget build(BuildContext context) {
    return Container(
      margin: EdgeInsets.only(bottom: 10),
      // height: 600,
      child: Row(
        mainAxisAlignment: MainAxisAlignment.start,
        children: [
          Expanded(
              flex: 1,
              child: InkWell(
                onTap: () {
                  print('热门频道');
                  Navigator.push(context, MaterialPageRoute(builder: (_) {
                    return leader_hot();
                  }));
                  // leader_hot
                },
                child: Container(
                  alignment: Alignment.center,
                  // color: Colors.red,
                  child: Column(
                    children: [
                      Container(
                        decoration: new BoxDecoration(
                          color: Color.fromRGBO(238, 249, 255, 1),
                          // color: Colors.red,
                          // 设置四周圆角，角度
                          borderRadius: BorderRadius.all(Radius.circular(50.0)),
                        ),
                        margin: EdgeInsets.all(4),
                        padding: EdgeInsets.all(8),
                        child: Image.asset(
                            'assets/images/common/leader_menu/hot.png'),
                      ),
                      Text(
                        '热门频道',
                        style: TextStyle(fontSize: 12, color: Colors.black87),
                      )
                    ],
                  ),
                ),
              )),
          Expanded(
              flex: 1,
              child: InkWell(
                onTap: () {
                  print('排名');
                  Navigator.push(context, MaterialPageRoute(builder: (_) {
                    return leader_rank();
                  }));
                  // leader_rank
                },
                child: Container(
                  alignment: Alignment.center,
                  // color: Colors.red,
                  child: Column(
                    children: [
                      Container(
                        decoration: new BoxDecoration(
                          color: Color.fromRGBO(238, 249, 255, 1),
                          // color: Colors.red,
                          // 设置四周圆角，角度
                          borderRadius: BorderRadius.all(Radius.circular(50.0)),
                        ),
                        margin: EdgeInsets.all(4),
                        padding: EdgeInsets.all(8),
                        child: Image.asset(
                            'assets/images/common/leader_menu/rank.png'),
                      ),
                      Text(
                        '排行',
                        style: TextStyle(fontSize: 12, color: Colors.black87),
                      )
                    ],
                  ),
                ),
              )),
          Expanded(
              flex: 1,
              child: InkWell(
                onTap: () {
                  print('免费阅读');
                  Navigator.push(context, MaterialPageRoute(builder: (_) {
                    return Scaffold(
                      appBar: AppBar(
                        iconTheme: IconThemeData(
                          color: Colors.black87, //修改颜色
                        ),
                        centerTitle: true,
                        backgroundColor: Color.fromRGBO(255, 250, 250, 1),
                        // leading:
                        title: Text(
                          '免费阅读',
                          style: TextStyle(color: Colors.black87),
                        ),
                      ),
                      body: Stack(
                        children: [
                          found_tabs(),
                        ],
                      ),
                    );
                  }));
                  // found_tabs
                },
                child: Container(
                  alignment: Alignment.center,
                  // color: Colors.red,
                  child: Column(
                    children: [
                      Container(
                        decoration: new BoxDecoration(
                          color: Color.fromRGBO(238, 249, 255, 1),
                          // color: Colors.red,
                          // 设置四周圆角，角度
                          borderRadius: BorderRadius.all(Radius.circular(50.0)),
                        ),
                        margin: EdgeInsets.all(4),
                        padding: EdgeInsets.all(8),
                        child: Image.asset(
                            'assets/images/common/leader_menu/free_book.png'),
                      ),
                      Text(
                        '免费阅读',
                        style: TextStyle(fontSize: 12, color: Colors.black87),
                      )
                    ],
                  ),
                ),
              )),
        ],
      ),
    );
  }
}
